Skip to content

Conversation

@cointem
Copy link

@cointem cointem commented Nov 29, 2025

This pull request adds two new tools for organization management in the GitHub integration, along with their documentation, implementation, and test coverage. The new tools enable fetching organization members and listing outside collaborators, both with support for pagination and filtering. The changes are grouped into tool additions, documentation updates, and test enhancements.

New organization management tools:

  • Added the get_org_members tool, which retrieves members of a specified organization, with support for pagination and filtering by role (all, admin, member). [1] [2]
  • Added the list_outside_collaborators tool, which lists users who have access to organization repositories but are not organization members, also supporting pagination. [1] [2]
  • Registered both new tools in the default toolset group so they are available for use.

Documentation updates:

  • Updated README.md to include usage details for the new get_org_members and list_outside_collaborators tools, including their parameters and descriptions.

Test coverage:

  • Added comprehensive unit tests for both new tools, covering successful calls, empty results, client errors, and API errors.

These changes improve the ability to manage and audit organization membership and access via the GitHub integration.

@cointem cointem requested a review from a team as a code owner November 29, 2025 16:32
Copilot AI review requested due to automatic review settings November 29, 2025 16:32
@cointem
Copy link
Author

cointem commented Nov 29, 2025

refs #1331

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds two new tools for organization management: get_org_members to retrieve organization members with role filtering and pagination, and list_outside_collaborators to list users with repository access who aren't organization members. The implementation follows existing patterns with comprehensive test coverage and documentation updates.

  • Adds organization member and outside collaborator listing capabilities
  • Includes full test coverage with success and error scenarios
  • Updates README and toolsnap schema files

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
pkg/github/context_tools.go Implements the two new organization tools with pagination support and user data transformation
pkg/github/context_tools_test.go Adds comprehensive unit tests for both tools covering success, empty results, client errors, and API errors
pkg/github/tools.go Registers the new tools in the context toolset and refactors type declarations into grouped format
pkg/github/toolsnaps/get_org_members.snap Documents the API schema for the get_org_members tool
pkg/github/toolsnaps/list_outside_collaborators.snap Documents the API schema for the list_outside_collaborators tool
README.md Adds documentation for both new tools in the Context section

fix: change method name capitalization to adjust export visibility
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.

…side collaborators

- Updated GetOrgMembers to utilize GraphQL for fetching organization members with roles.
- Refactored ListOutsideCollaborators to use the GitHub API for listing outside collaborators.
- Improved error handling and response structures in both tools.
- Added tests for new GraphQL implementations and ensured compatibility with existing functionality.
@KevinPartingtonTR
Copy link

@SamMorrowDrums Any chance you could approve the running of workflows on this PR? And could you or another maintainer please review this PR when you have a chance? It's been sitting since November. Thank you!

@SamMorrowDrums
Copy link
Collaborator

@KevinPartingtonTR thanks for the ping, we have to strike a pretty delicate balance for adding new tools, vs keeping context usage low as possible, so we often don't move fast on tool additions.

That said we have new mechanisms available for testing things out, and mentioning the workflows and use-cases you have is most important in convincing us why some tools should be merged over others etc.

Prompts you wish would work and examples like that are also incredibly valuable.

@KevinPartingtonTR
Copy link

Thank you @SamMorrowDrums! I'm a well intentioned third party, not the developer of this PR (that would be @cointem), so I'll ping them so they can see your response.

I believe you're saying you would like to see more prompts and examples? Or are you saying you've seen enough examples and will review in the near future?

@SamMorrowDrums
Copy link
Collaborator

SamMorrowDrums commented Feb 11, 2026

Will review soon anyway @KevinPartingtonTR I appreciate you're not the author, I was just curious if you were endorsing the PR because of a specific desire, and if you knew what specifically you'd type into an agent that you'd want to work.

@KevinPartingtonTR
Copy link

Thanks @SamMorrowDrums, makes sense.

Actually, my main interest is that I'm in an extremely large enterprise organization with nearly 4k repos and nearly 3k teams, and I'd like to be able to prompt for "PRs that may need my review". It's easy to get PRs that have me as a requested reviewer, but what I'd like to do is get repositories associated with a GitHub Team I'm on, and then iterate through those to get PRs that need review. So that's not particularly related to this specific PR, but there's some overlap since I'm interested in organization members, teams, etc. I thought getting something like this in would help me make the case for getting an org team's repos in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants